2020-2021 Sunseeker Telemetry and Lighting System
adc_ex2_intRef.c File Reference
#include "driverlib.h"
#include "Board.h"

Go to the source code of this file.

Macros

#define TIMER_PERIOD   80
 

Functions

void main (void)
 
void ADC_ISR (void)
 
void TA0_ISR (void)
 

Macro Definition Documentation

◆ TIMER_PERIOD

#define TIMER_PERIOD   80

ADC - Sample A7 input, 1.5V Shared Ref, LED ON if A7 > 0.5V

MSP430FR4133 Demo A single sample is made on A7 with reference to internal 1.5V Vref.Software sets ADCSC to start sample and conversion - ADCSC automatically cleared at EOC. ADC internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC conversion complete, ADC_ISR will force exit from LPM0 in Mainloop on reti. If A7 > 0.5V, P1.0 set, else reset.

     MSP430FR2xx_4xx Board
       -----------------
   /|\|              XIN|-
    | |                 |
    --|RST          XOUT|-
      |               A7|<-- Sample Signal
      |                 |-->LED1
      |                 |-->LED2

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • ADC peripheral
  • REF peripheral
  • Timer_A/Timer_B peripheral
  • GPIO Port peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • ADC_VECTOR
  • TIMER0_A0_VECTOR/TIMER0_B0_VECTOR

Definition at line 70 of file adc_ex2_intRef.c.

Function Documentation

◆ ADC_ISR()

void ADC_ISR ( void  )

◆ main()

void main ( void  )

Definition at line 72 of file adc_ex2_intRef.c.

References __delay_cycles(), __no_operation(), initUpModeParam, and TIMER_PERIOD.

◆ TA0_ISR()

void TA0_ISR ( void  )

Definition at line 270 of file adc_ex2_intRef.c.